Release 10.1A: OpenEdge Development:
Progress 4GL Handbook


Using NO-UNDO variables and temp-tables

When variables without the NO-UNDO qualifier are updated, a before-image of the previous value is generated in what amounts to a separate record buffer for all NO-UNDO variables. This is useful when you want the original value restored when you UNDO a block or transaction. When you do not need this capability, the before-image generation is needless overhead. Use of NO-UNDO also causes the Progress local before-image (.lbi) file, which is maintained for each user connected to a database, to be smaller. As noted in Chapter 2, "Using Basic 4GL Constructs," when this guide first introduced the DEFINE VARIABLE statement, it is unusual for variables to require the UNDO support that they receive by default. So, it is a good practice to make the NO-UNDO keyword a standard part of your variable definitions unless a particular variable really needs the support.

With temp-tables the situation is not always as clear. There might be cases where you are adding records to a temp-table or changing records in a temp-table within a transaction, and you want to be able to undo those changes. If this is not the case, however, you’ll benefit significantly from defining the temp-table with the same NO-UNDO qualifier as for variables. This spares you from having Progress create a before-image of every temp-table change made within a transaction.


Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095